const getContext2d = function (_canvas) {
    let ctx = _canvas.getContext('2d')
    return ctx
}

const drawRect = function (_c2d,data,color='#ff0000',_lineWidth='2') {
    _c2d.strokeStyle = color;
    _c2d.lineWidth = _lineWidth
    _c2d.strokeRect(...data)
}

const clearContext = function (_canvas,_c2d) {
    _c2d.clearRect(0,0,_canvas.width,_canvas.height)
}

export { getContext2d, drawRect, clearContext }